package com.tianqu.tms.www.car.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

import com.tianqu.tms.core.base.Logger;
import com.tianqu.tms.core.base.TmsAjaxAction;
import com.tianqu.tms.core.base.UserContext;
import com.tianqu.tms.core.exception.TmsException;
import com.tianqu.tms.www.bid.action.BidStatusCheckAjaxAction;
import com.tianqu.tms.www.car.controller.VinSearchController;

/**
 *  moufeiyu
 */
public class vinSearchAjaxAction extends TmsAjaxAction{
	
	private Logger logger = Logger.getLogger(BidStatusCheckAjaxAction.class);
	
	private static final String	 RESPONSETEXT="responseText"; 
	
	@Override
	public void process(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response,
			UserContext uc) throws TmsException {
		
		logger.debug(this.getClass().getName() + "#execute was called.");
		
		VinSearchController controller =  new VinSearchController();

		try {
			
			controller.execute(uc);
			String st = (String) uc.getAttribute(RESPONSETEXT);
			responseValues(response, st, TEXT);
			
			logger.debug(this.getClass().getName() + "#execute was completed.");
			
		} catch (Exception e) {
			
			e.printStackTrace();
		}
	}
}
